Page({
  requestHttp() {
    dd.httpRequest({
      url: 'http://httpbin.org/post',
      method: 'POST',
      data: {
        from: '钉钉',
        production: 'Dingtalk',
      },
      dataType: 'json',
      success: function(res) {
        console.log("success:",res);
         let data = res.data.data;
         let origin = res.data.origin;
         let url = res.data.url;
        //  console.log("url",url)
        console.log('origin',origin)
         console.log("已转换：",data)
        // dd.alert({content: JSON.stringify(res)}); 
      },
      fail: function(res) {
         console.log("fail:",res)
        // dd.alert({content: JSON.stringify(res)});
      },
      complete: function(res) {
         console.log("complete:",res)

        // dd.alert({title: 'complete'});
      }
    });
  }
})
